﻿@model Licitar.Models.Empresa

@{
    ViewBag.Title = "Registrar";
}

<h2>Registrar</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Empresa</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.NombreEmpresa)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NombreEmpresa)
            @Html.ValidationMessageFor(model => model.NombreEmpresa)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RazonSocial)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RazonSocial)
            @Html.ValidationMessageFor(model => model.RazonSocial)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Rubro)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Rubro, new SelectList (ViewBag.Rubros, "NombreRubro", "NombreRubro"), String.Empty)
            @Html.ValidationMessageFor(model => model.Rubro)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Dire.Calle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Dire.Calle)
            @Html.ValidationMessageFor(model => model.Dire.Calle)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Dire.Dpto)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Dire.Dpto)
            @Html.ValidationMessageFor(model => model.Dire.Dpto)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.Dire.Numero)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Dire.Numero)
            @Html.ValidationMessageFor(model => model.Dire.Numero)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Dire.Piso)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Dire.Piso)
            @Html.ValidationMessageFor(model => model.Dire.Piso)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Dire.Provi)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Dire.Provi, new SelectList(ViewBag.Provincias, "NombreProvincia", "NombreProvincia"), String.Empty)
            @Html.ValidationMessageFor(model => model.Dire.Provi)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Cuit)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Cuit)
            @Html.ValidationMessageFor(model => model.Cuit)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PaginaWeb)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PaginaWeb)
            @Html.ValidationMessageFor(model => model.PaginaWeb)
        </div>

        <p>
            @Html.JQueryUI().Button("Create")
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
